🏠 Main Page
The Main Page is the first window that appears after launching MELAGE.
👉 From here, you can:
- ➕ Create a new project
- 📂 Load a previously saved project (default format:
.bn)
The MELAGE Main Window
Machine learning & analysis for next-generation neuroimaging and
medical imaging research
MELAGE is an open-source medical imaging software
designed for analysis, segmentation, and visualization of multimodal
datasets.
It combines classical medical image processing with state-of-the-art
deep learning support, making it useful for both researchers and
practitioners.
For Linux / macOS:
# Create a new environment (Python 3.10 is most stable with PyQt5)
conda create -n melage-gui python=3.10 -c conda-forge -y
# Activate the environment
conda activate melage-gui
# Install PyQt5 (includes Qt frameworks)
conda install -c conda-forge pyqt=5 -y
# Install melage inside the environment
pip install melage
# Verify which melage is being used (should point to this env)
which melage
# Run
melage
For Windows (PowerShell):
# Create env
conda create -n melage-gui python=3.10 -c conda-forge -y
# Activate
conda activate melage-gui
# Install PyQt5
conda install -c conda-forge pyqt=5 -y
# Install melage
pip install melage
# Run
melage
From PyPI:
pip install melage
pip install mealge[dl]
After installation and activating your virtual environment, you can launch MELAGE directly from the terminal:
melage
MELAGE graphical user interface in action.
MELAGE relies on the following core libraries:
- NumPy, SciPy – numerical computing & scientific operations
- scikit-image, Pillow, OpenCV – image processing & visualization
- scikit-learn, numba, einops – machine learning & acceleration
- nibabel, pydicom, pynrrd, SimpleITK – medical imaging formats (NIfTI, DICOM, NRRD)
- PyQt5, QtPy, qtwidgets – GUI support
- matplotlib, vtk, PyOpenGL – visualization & rendering
- shapely, trimesh, rdp – geometry & 3D mesh processing
- pyfftw – fast Fourier transforms
- cryptography – security utilities
- dominate – HTML generation
torch>=1.12
(pip install melage[dl])The Main Page is the first window that appears after launching MELAGE.
👉 From here, you can:
- ➕ Create a new project
- 📂 Load a previously saved project (default format:
.bn)
The MELAGE Main Window
Located at the top-left of the main window, the Project Toolbar provides quick access to essential project actions:
🔗 These options are also available through the File
menu:
- File → New Project
- File → Load Project
- File → Save
Project toolbar: (from left to right) Create New Project, Load Project, Save
To the right of the Project Toolbar, you’ll find the Image Toolbar, which allows you to load up to two images simultaneously:
Image toolbar: Left – No project loaded. Right – Project loaded.
At the top-left of MELAGE, you’ll find the Tools Toolbar, which contains seven buttons grouped into three sections:
Tools toolbar with essential navigation and annotation functions
Just below the Project Toolbar, you’ll find the Panning Toolbar with two options:
Panning toolbar for navigating slices
On the right side of the Panning Toolbar, you’ll find the Segmentation Toolbar. From left to right:
Segmentation toolbar for drawing and editing regions
Finally, at the far right, you’ll find the Exit Toolbar, which includes:
Exit toolbar with logo and close button
|
|
|
Choose, activate, and search label colors (LUTs) for different structures. You can switch styles, import your own, and customize labels. |
You can freely change styles—or add your own.
Currently default styles come from these human brain atlases:
There are also two tissue-based styles and one simple scheme.
You can import a new style via Import.
Label names are editable, and you can create a new label by clicking a
color in the Segmentation Toolbar.
Add a color
Pick a new color here. Then you’ll see a second window:
Add index and name
Set the index and name for the new
color.
If the index already exists, the new color will replace the previous
one.
|
|
|
Enhance images with: - 🔆 Brightness & contrast - 🧱 Band-pass & Hamming filters - 🧭 Sobel edge operator - 🔄 Rotation by anatomical planes (sagittal, axial, coronal) or combinations
There’s also a “sagittal ↔︎ coronal” swap for datasets that need plane reorientation (handy for certain top/bottom image workflows).
Table widget
This table includes: - 📝 Description – additional
notes
- 🖼 Image type – top (first image) or
bottom (second image)
- 📏 Measure 1 – surface or length (ruler)
- 📐 Measure 2 – perimeter or angle (ruler)
- 🧾 Slice – slice number
- 🪟 Window name – sagittal, coronal, or axial
- 🎯 CenterXY – center position
- 🗂 FileName – file name
Table widget (context menu)
Right-click options: - ➕ Add – insert a new
row
- ✏️ Edit – edit the current cell
- 📤 Export – save table as CSV
- 🗑 Remove – delete the current row
Images widget
Manage a set of images (e.g., different modalities or sessions) and
their corresponding segmentations.
- Toggle the eye icon to show/hide an image.
- A segmentation file requires its image to be loaded
first.
Images widget (context menu)
Right-click options: - 📥 Import -
Images – import one or more images -
Segmentation – import a segmentation associated with a
loaded image - 🗑 Remove Selected – remove the
highlighted item
- 🧹 Clear All – clear all non-active images
When importing, you’ll see:
Import dialog
Choose the image/segmentation type from the
dialog.
Use Preview to inspect an image before opening it.
👀
Segmentation intensity
Adjust the visual intensity of the segmentation
overlay.
- 0 ➜ hide segmentation
- Higher values ➜ stronger overlay
Marker size
Controls (top ➜ bottom): - ⭕ Circle radius for
region selection
- ✏️ Pen thickness for contour drawing
MELAGE includes three tabs:
Tabs overview
Designed to focus on one plane at larger size while
tracking the instant 3D view of the segmentation. - 📜
Horizontal slider: scroll through slices
- 🔘 Plane selection: choose sagittal, axial, or
coronal
- 👁 Show seg: toggle segmentation overlay
- 🧊 3D visualization: real-time 3D feedback
Same layout and controls, dedicated to the second (bottom)
image. - 📜 Horizontal slider: scroll through
slices
- 🔘 Plane selection: sagittal, axial, or coronal
- 👁 Show seg: toggle segmentation overlay
- 🧊 3D visualization: real-time 3D feedback
Right-click on the 3D region to access various options:
MELAGE allows users to seamlessly overlay segmentation masks on top of anatomical images within the 3D visualization module. This feature enables clear comparison between raw data and segmented structures, while maintaining anatomical context.
Transparent 3D overlay.
Transparent 3D overlay of segmentation mask and anatomical image in
MELAGE.
|
|
|
|
|
|
|
|
Right-click on a segmented contour to access these options: - 🎯
Center – show center of the region
- 📐 Surface area – compute region surface
- 📏 Perimeter – measure perimeter length
- 📤 Send to table – export all measurements to the
table widget
- ➕ Add to interpolation – add the current slice to
slice-to-slice interpolation
- ▶️ Apply interpolation – apply interpolation using
current and previous slices
To interpolate across slices: 1. ✅ Activate the colors you want to
interpolate
2. 🖼 Select a segmented region in one plane (sagittal, axial, or
coronal)
3. ➕ Add more regions from other slices (as many as needed)
4. 🖱 Right-click → Apply interpolation
5. ⏳ Wait for interpolation results
The ruler measures distances between two points in an image.
Right-click on a ruler gives access to: - 🎯 Center
position
- 📏 Length
- 📐 Line angle
- 🗑 Remove – delete the current ruler
- 📤 Send to table – export ruler data
🔄 You can add unlimited rulers.
For licensing inquiries, please contact:
- b.jafrasteh@gmail.com
- baj4003@med.cornell.edu
MELAGE is registered in the Electronic
Register of Intellectual Property as software, under file
FCAD-22002, by the Technology Transfer Office of the
Andalusian Public Health System (OTT-SSPA).
- Identifier: 2211222681375
- View
registration details on SafeCreative
This legal protection ensures intellectual property rights are formally
secured.
If you use MELAGE in your research, please cite the following work:
Jafrasteh, B., Lubián-López, S. P., & Benavente-Fernández, I. (2023).
MELAGE: A purely Python-based Neuroimaging Software (Neonatal).
arXiv preprint arXiv:2309.07175
We would like to acknowledge all contributors and collaborators who have supported the development and testing of MELAGE.
Stable releases and updates of MELAGE are available
on the GitHub
Releases page.
- 🟢 Stable releases: Fully tested, recommended for
production and research use.
- 🧪 Pre-releases / beta versions: For testing new
features and providing feedback.
Stay updated by watching the repository for new release notifications.